package org.rust.lang;

/*********************************************************************
* Something that points to another language element
* i.e an pointer i could point at an IntVal 1
* in the statement (i = 1)
* Or sumSquared could point at a funcdef in the statement 
* (sumSquared = function( (a b) ((a+b) * (a+b)) ))
**********************************************************************/
public class Ref extends Elem
{

   private Elem elem = null; // e.g. 1 in (i = 1)
   
   private final String name;// e.g. i in (i = 1)
   
   public String getName()
   {
      return this.name;
   }
   
   public Elem getElem()
   {
      return elem;
   }

   public void setElem(Elem elem)
   {
      this.elem = elem;
   }

   
   public Ref(Node parent, String name)
   {
      super(Elem.Type.REFERENCE, parent);
      this.name = name;
   }
   
}

